//统一接口返回数据格式
export const successResult = <T>(data: T, code = 0, message = 'success') => {
  return {
    code,
    data,
    message
  }
}

export const errorResult = (message = 'fail', data = null, code = -1) => {
  return {
    code,
    data,
    message
  }
}